<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>模板返利网－买模板返现金，免费装修，淘宝店铺装修模板免费买</title>
        <link rel="stylesheet" type="text/css" href="/Public/default/css/style.css" />
        <link rel="stylesheet" type="text/css" href="/Public/default/css/UserLogin.css" />
        <link rel="stylesheet" type="text/css" href="/Public/default/css/regStep.css" />
        <link rel="stylesheet" type="text/css" href="/Public/css/default.css" />
        <script type="text/javascript" src="__ROOT__/Public/js/jquery.min.js"></script>
        <script type="text/javascript" src="__ROOT__/Public/js/jquery.form.js"></script>
        <script type="text/javascript" src="__ROOT__/Public/js/operamasks-ui.min.js"></script>
        <script src="http://a.tbcdn.cn/s/kissy/1.1.6/seed-min.js"></script>
        <script src="http://a.tbcdn.cn/apps/pamirsshop/wiki/scripts/wiki.js"></script>
    </head>

    <body onload="bhtml()">
        <div id="edit"></div>
        <div id="meng"></div>
        <div id="tips"></div>
        <!--头部-->
        <div class="top">
            <ul>
                <li><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=496886097&site=qq&menu=yes">售前QQ:496886097</a>；<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=2261356156&site=qq&menu=yes">售后QQ:2261356156</a>
                 <a href="#">网站地图</a> 
                 <a href="javascript:" onClick="window.external.addFavorite('http://www.fanlibm.com','模板反复网')" title="模板反复网">收藏本站</a> 
                 <?php if(empty($_SESSION['userid'])): ?><a href="__APP__/Public/register" class="red">免费注册</a> ¦ 
                 <a href="__APP__/Public/login" class="blue">登录</a> ¦ 
                 <?php else: ?>
                 <a href="__APP__/Public/logout" class="blue">安全退出</a> ¦<?php endif; ?>
                 <a href="__APP__/Index">网站首页</a> ¦ 
                 <a href="#">客服中心</a> ¦ 
                 <a href="#">帮助中心</a></li>
            </ul> 
        </div>
        <!--LOGO-->
        <div class="head">
            <div class="logo"><img src="/Public/default/images/logo.jpg" width="227" height="90" title="返利网" /></div>
            <div class="banner"><img src="/Public/default/images/banner.jpg" width="637" height="109" title="广告" /></div>
        </div>
        <!--导航-->
        <div class="nav">
            <div class="w980">
                <a href="/" <?php if(($module_name == 'Index') and ($action_name == 'index') or ($module_name == 'Public')): ?>class="cur"<?php endif; ?> >首页</a> 
                <a href="__APP__/Temp/index" <?php if(($module_name == 'Temp') and ($action_name == 'index')): ?>class="cur"<?php endif; ?> >装修模板</a> 
                <a href="__APP__/Article/index" <?php if(($module_name == 'Article') and ($action_name == 'index')): ?>class="cur"<?php endif; ?> >开店知识</a> 
                <a href="/" >返利教程（必读）</a> 
                <a href="/" >商业合作</a>               
            </div>
        </div>        
<script type="text/javascript">
            function qbot(){
                $("#tips").hide();
                $("body").css({"overflow":"auto"});
            }
            function query(i){
                var f = $('#formwork option:selected').val();
                var t = $('#trade option:selected').val();
                var c = $('#color option:selected').val();
                var s = $('#sty option:selected').val();
				var r = $('#rate option:selected').val();
                var n = $('#num').val();
                $.get('__URL__/addsty/f/'+f+'/t/'+t+'/c/'+c+'/s/'+s+'/id/'+i+'/n/'+n+'/r/'+r,function(data){
                    if(data == 1){
                        $("#tips").hide();
                        $("body").css({"overflow":"auto"});
                        var h = window.screen.height;
                        var w = window.screen.width;
                        $("#tips").css({"left":(w/2-100)+"px","top":(h/2-100)+"px","display":"block"});
                        $("#tips").html('<div style="font-size:12px; padding:10px;">修改成功</div>').animate({opacity: 'hide'}, 2000);
						document.location.reload();		
                    }
                    if(data == 0){
                        alert("上架后的模板，不允许设置属性为空");
                    }
                });
            }
            function bhtml(){
                var id = '<?php echo ($temp["id"]); ?>';
                $.get("__URL__/qhtml/id/"+id,function(data){
                    $("#ht").html(data);
                });
            }
        </script>

<script type="text/javascript">
    $(function(){
        
        $("#ks-switchable7").click(function(){
            $(".tab-content").children("div").hide();
            $(".userdefined").show();
        });
        $("#ks-switchable8").click(function(){
            $(".tab-content").children("div").hide();
            $(".comment").show();
        });
        $("#ks-switchable9").click(function(){
            $(".tab-content").children("div").hide();
            $(".records").show();
        });
       
    })
    //ajax 调取方法 新建数据 显示提示
    function go(){
        var h = window.screen.height;
        var w = window.screen.width;
        var type = '<?php echo ($_SESSION["type"]); ?>';
        if(type != ""){
            if( type == 1){
                $(".btn-buy").attr("href","javascript:;");
                $(".btn-buy").attr("target","");
                alert("设计师不能购买!");
            }else{
                var nameid = '<?php echo ($temp["userid"]); ?>';
                var id = '<?php echo ($temp["id"]); ?>';
                $.get('__URL__/buy/id/'+id+'/nameid/'+nameid,function(data){
                    $("#tips").show();
                    $("body").css({"overflow-Y":"hidden"});
                    $("#tips").css({"left":(w/2-100)+"px","top":(h/2-100)+"px","display":"block"});
                    $("#tips").html(data);
                });
       
            }
        }else{
            $(".btn-buy").attr("href","javascript:;");
            $(".btn-buy").attr("target","");
            $("#tips").show();
            $("body").css({"overflow-Y":"hidden"});
            $("#tips").css({"left":(w/2-100)+"px","top":(h/2-100)+"px","display":"block"});
            $("#tips").html("请 <a href='/index.php/Public/login' style='color:red;'>登录</a> 后进行购买");
        }
    }
    //确认
    function goy(i,ind){
        var wwname = $("#wwname").val();
        if(i ==1){
            $.get('__URL__/buyy/ind/'+ind+'/wwname/'+wwname,function(data){
                $("#tips").hide();
                $("body").css({"overflow":"auto"});
                window.location.href='__APP__/User/orderlist';
            });
        }else{
            $("#tips").hide();
            $("body").css({"overflow":"auto"});
        }
    }
    
  
    
</script>
<div class="detail-up">
    <div class="template-info">
        <div class="layout">
            <div class="col-main">
                <div class="main-wrap template-detail">
                    <i <?php if($temp["farmwork"] == 1 or $temp["farmwork"] == 6 ): ?>class="advanced-mark"<?php elseif($temp["farmwork"] == 2 or $temp["farmwork"] == 7 ): ?>class="jy"<?php elseif($temp["farmwork"] == 3): ?>class="jsm"<?php endif; ?>></i>
                    <div class="sale-info">
                        <h2><?php echo ($temp["title"]); ?></h2>
                        <div class="fon">
                            <dl class="contents">
                                <dt>淘宝售量：</dt>
                                <dd><strong><?php echo ($html); ?></strong></dd>
                            </dl>
                            <dl class="contents red">
                                <dt>本站售量：</dt>
                                <dd><strong><?php echo ($temp["count"]); ?></strong></dd>
                            </dl>
                            <dl class="contents li">
                                <dt>模板价格：</dt>
                                <dd><span>¥ </span><strong><span class="price-s-show"><?php echo ($temp["price"]); ?>元</span></dd>
                                <input type="hidden" class="price-s" value="30.00">
                            </dl>
                            <dl class="contents red">
                                <dt>本站价格：</dt>
                                <dd><span>¥ </span><strong><span class="price-s-show"><?php echo $temp['price']-$temp['price']*$temp['rate']; ?>元</span></strong> </dd>
                                <input type="hidden" class="price-s" value="30.00">
                            </dl>
                        </div>
                    </div>
                    <div class="btn-list">
                        <a href="http://zx<?php if($temp["type"] == 1): ?>n<?php endif; ?>.taobao.com/detail.htm?id=<?php echo ($temp["id"]); ?>" target="_blank" onclick="go()" class="btn-buy" title="立即购买"></a>
                        <a href="<?php if($temp["type"] == 1): ?>http://zxn.taobao.com/tryTemplate.htm?productId=<?php echo ($temp["id"]); else: ?>http://zx.taobao.com/try_template.htm?templateId=<?php echo ($temp["id"]); endif; ?>" target="_blank" class="btn-prev" title="立即试用"></a>
                    </div>
                    <div class="separation-line">
                    </div>
                    <div class="sns-section">
                        <div class="designer">
                            <a class="nick" href="#">设计师:  <?php echo ($temp["ww"]); ?> </a>
                            <a href="http://amos.im.alisoft.com/msg.aw?spm=0.0.0.0.UZIR91&amp;v=2&amp;uid=<?php echo ($temp["ww"]); ?>&amp;s=1&amp;site=cntaobao&amp;charset=utf-8" target="_blank">
                                <img border="0" alt="" src="http://amos.im.alisoft.com/online.aw?v=2&amp;uid=<?php echo ($temp["ww"]); ?>&amp;site=cntaobao&amp;s=1&amp;charset=utf-8">
                            </a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="template-image col-sub">
                <a href="http://zx<?php if($temp["type"] == 1): ?>n<?php endif; ?>.taobao.com/detail.htm?id=<?php echo ($temp["id"]); ?>"><img src="<?php echo ($temp["frontpage"]); ?>" ></a>
            </div>
        </div>
    </div>
</div>
<div class="detail-down">
    <div class="layout">
        <div class="mkmenu" id="J_menu">
            <ul class="tabbar clear" role="tablist">
                <li class="selected" role="tab" tabindex="0" id="ks-switchable7">模板详情</li>
            </ul>
            <span id="ht"></span>

        </div>
    </div>
</div>

</body>
</html>